<?php
require('includes/top.php');

$laptop_model = $_POST['laptop_model'];
$serial_no = $_POST['serial_no'];
//$depot = $_POST['depot'];
$depotto = $_POST['depotto'];
//echo $depotto;

$laptop_array = explode('-',$laptop_model);


$sql="Update laptop_details set `depot_location`='".$depotto."' where laptop_name ='".trim($laptop_array[0])."' and laptop_model='".trim($laptop_array[1])."' and serial_no='".$serial_no."' and status=1";

echo $sql; 
$result = mysql_query($sql);

if($result>0)
{
header('Location: transfer.php?v=success');
}
else
{
header('Location: transfer.php?v=err');
}
?>